# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=metafinder
pkgver=v1.2.r2.g30c8475
pkgrel=5
pkgdesc='Search for documents in a domain through Search Engines (Google, Bing and Baidu). The objective is to extract metadata.'
arch=('any')
groups=('blackarch' 'blackarch-recon')
url='https://github.com/Josue87/MetaFinder'
license=('GPL3')
depends=('python' 'python-requests' 'python-pikepdf' 'python-beautifulsoup4'
         'python-openpyxl' 'python-python-docx' 'python-python-pptx'
         'python-urllib3' 'python-prompt_toolkit')
makedepends=('git' 'python-setuptools')
source=("$pkgname::git+https://github.com/Josue87/MetaFinder.git")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname

  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd $pkgname

  python setup.py build
}

package() {
  cd $pkgname

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

